package cn.edu.sgu.www.mhxysy.dto.equipment;

import cn.edu.sgu.www.mhxysy.consts.CustomMessages;
import cn.edu.sgu.www.mhxysy.dto.DataTransferObject;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;

/**
 * @author 沐雨橙风ιε
 * @version 1.0
 */
@Data
@ApiModel
public class EquipmentCategoryDTO implements DataTransferObject {

    @ApiModelProperty(value = "ID")
    private Integer id;

    /**
     * 装备名称
     */
    @NotBlank(message = "装备名称" + CustomMessages.NOT_NULL)
    @ApiModelProperty(value = "装备名称", required = true)
    private String name;

    /**
     * 装备类型
     */
    @Positive(message = "装备类型" + CustomMessages.ILLEGAL)
    @NotNull(message = "装备类型" + CustomMessages.ID_NOT_NULL)
    @ApiModelProperty(value = "装备类型", required = true)
    private Integer type;

    /**
     * 装备等级
     */
    @Range(min = 1, max = 100, message = "装备等级" + CustomMessages.ILLEGAL)
    @NotNull(message = "装备等级" + CustomMessages.NOT_NULL)
    @ApiModelProperty(value = "装备等级", required = true)
    private Integer grade;

    /**
     * 装备说明
     */
    @NotBlank(message = "装备说明" + CustomMessages.NOT_NULL)
    @ApiModelProperty(value = "装备说明", required = true)
    private String note;
}